package com.boyinet.imesh2json.common


/**
 * @author lengchunyun
 */
class CustomProtocol {
    var type: String? = null
    var segmentNum: Int? = null
    var sn: String? = null
    var data: MutableMap<String, SlaveValue> = HashMap()
    var attributes: ExtendedAttributes? = null


    class SlaveValue {
        var seniorType: Int? = null
        var unit: String? = null
        var value: String? = null
        var decimalPlaces: Int? = null
        override fun toString(): String {
            return "SlaveValue(seniorType=$seniorType, unit=$unit, value=$value, decimalPlaces=$decimalPlaces)"
        }


    }

    override fun toString(): String {
        return "CustomProtocol(type=$type, segmentNum=$segmentNum, sn=$sn, data=$data, attributes=$attributes)"
    }


}